import 'package:flutter/material.dart';
import 'package:xindong/common/xindong_sezhi.dart';

class XinDongZhuTi {
  static final theme = ThemeData(
    useMaterial3: false,
    appBarTheme: const AppBarTheme(
      backgroundColor: DZColors.appBar,
      elevation: 0.5,
    ),
    bottomAppBarTheme: const BottomAppBarTheme(
      color: DZColors.tabBar,
      elevation: 0.5,
    ),
    scaffoldBackgroundColor: DZColors.backgroundColor,
    // 应用程序主要部分的背景颜色(utilbars、tab bars 等原色)
    primaryColor: DZColors.mainColor,
    primaryColorLight: DZColors.mainColor,
    primaryColorDark: DZColors.mainColor,
    // 复选框
    checkboxTheme: CheckboxThemeData(
      checkColor: MaterialStateProperty.all(Colors.white),
      fillColor: MaterialStateProperty.resolveWith((states) {
        if (states.contains(MaterialState.selected)) {
          return DZColors.mainColor;
        }
        return Colors.transparent;
      }),
    ),
    // 文本选择
    textSelectionTheme: const TextSelectionThemeData(
      // 文本框中光标的颜色，如TextField
      cursorColor: DZColors.mainColor,
    ),
    textButtonTheme: TextButtonThemeData(
      style: ButtonStyle(
        // 设置水波纹颜色
        overlayColor: MaterialStateProperty.all(Colors.transparent),
      ),
    ),
    // 设置水纹效果
    splashColor: Colors.transparent,
    highlightColor: Colors.transparent,
    // 视觉密度
    visualDensity: VisualDensity.adaptivePlatformDensity,
    // colorScheme: ThemeData()
    //     .colorScheme
    //     .copyWith(
    //       primary: DZColors.mainColor,
    //       secondary: DZColors.mainColor,
    //     )
    //     .copyWith(background: Colors.black),
  );
}
